<?php declare(strict_types=1);


namespace PinWuYun\command\li;

use GuzzleHttp\Exception\GuzzleException;
use PinWuYun\domain\service\commonServer\SyncService;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

/**
 * Created: by zhiJie
 * Date: 2021/7/5
 */
class SyncGoods extends Command
{
    public function __construct()
    {
        parent::__construct();
    }

    protected function configure()
    {
        $this->setName('sync/goods');
    }

    /**
     * @throws GuzzleException
     */
    protected function execute(InputInterface $input, OutputInterface $output): int
    {
        (new SyncService)->syncGoodsAll();
        return 1;
    }
}